package models
import (
	"github.com/astaxie/beego/orm"
	"time"
)


//用户控制记录的数组结构
type AccessLog struct {
	Id          	uint64		`orm:"unique;auto"`
	UserID			uint64
	OpCmd			string
	TimeStamp		time.Time	`orm:"auto_now_add;type(datetime)"`
}

func init() {
	// 需要在init中注册定义的model
	orm.RegisterModel(new(AccessLog))
}

//添加床位
//@param u  *Admin      要添加的用户数组结构体
//@return    int64      返回用户的id
//@return    error      返回的错误
func InsertAccessLog(log *AccessLog)  {

}
//func getAccessLogByTime(t time)  {
//
//}

func getAccessLogById(id uint64)  {

}

//func getAllAccessLog() (logs[] AccessLog){
//
//}